﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileContactInfosEdit.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.HomeProfileContactInfosEdit1" %>
<owc:OwDetailsView ID="HomeProfileContactInfosOwDv" runat="server" AutoGenerateRows="False"
    DataKeyNames="OpenHomeProfileContactInfoID" DataSourceID="HomeProfileContactInfosOds"
    OwNotificationID="" EnableModelValidation="True">
    <Fields>
        <asp:TemplateField>
            <InsertItemTemplate>
                <fieldset>
                    <legend>
                        <asp:Localize ID="Localize2" Text="<%$ OwR:GeneralInfo %>" runat="server"></asp:Localize>
                    </legend>
                    <div>
                        <owac:OwDetailCommonGroup ID="OwDetailCommonGroup1" runat="server" OwBindLanguageValue='<%# Bind("LanguageCode") %>'
                            OwBindContinentLocalityValue='<%# Bind("ContinentID") %>' OwBindCountryLocalityValue='<%# Bind("CountryID") %>'
                            OwBindProvinceLocalityValue='<%# Bind("ProvinceID") %>' OwBindDistrictLocalityValue='<%# Bind("DistrictID") %>'
                            OwAuthorVisible="false" OwSourceVisible="false" OwCategoryVisible="false" OwBindWardLocalityValue='<%# Bind("WardID") %>' />
                        <br />
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span>
                        <asp:Localize ID="Localize7" Text="<%$ OwR:InfoLabel %>" runat="server"></asp:Localize>
                    </span></legend>
                    <div>
                        <table width="100%">
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR runat="server" OwText="HomeProfileDetails" />:&nbsp;
                                </td>
                                <td>
                                    <owc:OwObjectDataSource ID="OpenHomeProfileDetailOds" runat="server" OldValuesParameterFormatString="original_{0}"
                                        SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileDetailsBLL"
                                        DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileDetailsEntity" DeleteMethod="OwDelete"
                                        InsertMethod="OwInsert" UpdateMethod="OwUpdate">
                                        <SelectParameters>
                                            <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="false" />
                                            <asp:Parameter Name="languageCode" Type="String" />
                                            <asp:Parameter Name="openHomeProfileID" Type="Int64" />
                                            <asp:Parameter Name="firstNameID" Type="Int64" />
                                            <asp:Parameter Name="lastNameID" Type="Int64" />
                                            <asp:Parameter Name="isDefault" Type="Boolean" />
                                            <asp:Parameter Name="twelveYearCycleOfAnimalID" Type="Int32" />
                                            <asp:Parameter Name="fiveElementID" Type="Int32" />
                                            <asp:Parameter Name="hometownContinentID" Type="Int64" />
                                            <asp:Parameter Name="hometownCountryID" Type="Int64" />
                                            <asp:Parameter Name="hometownProvinceID" Type="Int64" />
                                            <asp:Parameter Name="hometownDistrictID" Type="Int64" />
                                            <asp:Parameter Name="hometownWardID" Type="Int64" />
                                            <asp:Parameter Name="zodiacID" Type="Int64" />
                                            <asp:Parameter Name="sortClause" Type="String" />
                                            <asp:Parameter Name="sortDirection" Type="String" />
                                            <asp:Parameter Name="startRowIndex" Type="Int32" />
                                            <asp:Parameter Name="maximumRows" Type="Int32" />
                                        </SelectParameters>
                                    </owc:OwObjectDataSource>
                                    <owc:OwComboBox ID="OpenHomeProfileDetailCbb" runat="server" DataSourceID="OpenHomeProfileDetailOds"
                                        DataTextField="FullName" SkinID="OwComboBox" DataValueField="OpenHomeProfileDetailID" EmptyMessage="<%$ OwR:HomeProfileDetailsSelect %>"
                                        SelectedValue='<%# Bind("OpenHomeProfileDetailID") %>'>
                                    </owc:OwComboBox>

                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="<%$ OwR:HomeProfileDetailsSelect %>" Text="*" ControlToValidate="OpenHomeProfileDetailCbb"  />

                                </td>
                            </tr>
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR  runat="server" OwText="Email" />
                                    :&nbsp;
                                </td>
                                <td>
                                    <owc:OwTextBox ID="EmailTxt" runat="server" Text='<%#Bind("Email") %>' SkinID="OwTextBox" />
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                        ControlToValidate="EmailTxt" Display="Dynamic" 
                                        ErrorMessage="<%$OwR:EmailNotInvalid %>" 
                                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                    <asp:RequiredFieldValidator
                                        ID="RequiredFieldValidator2" runat="server" ControlToValidate="EmailTxt" ErrorMessage="<%$ OwR:EmailNotEmpty %>" Text="*" SetFocusOnError="true"></asp:RequiredFieldValidator>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR  runat="server" OwText="PhoneNumber" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="PhoneNumberTxt" runat="server" Text='<%#Bind("PhoneNumber") %>'
                                        SkinID="OwTextBox" />
                                         <asp:RequiredFieldValidator
                                        ID="RequiredFieldValidator3" runat="server" ControlToValidate="PhoneNumberTxt" ErrorMessage="<%$ OwR:PhoneNumberNotEmpty %>" Text="*" SetFocusOnError="true"></asp:RequiredFieldValidator>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR  runat="server" OwText="MobilePhoneNumber" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="MobilePhoneNumberTxt" runat="server" Text='<%#Bind("MobilePhoneNumber") %>'
                                        SkinID="OwTextBox">
                                    </owc:OwTextBox>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="Address" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="AddressTxt" runat="server" Text='<%#Bind("Address") %>' SkinID="OwTextBox">
                                    </owc:OwTextBox>

                                     <asp:RequiredFieldValidator
                                        ID="RequiredFieldValidator4" runat="server" ControlToValidate="AddressTxt" ErrorMessage="<%$ OwR:AddressNotEmpty %>" Text="*" SetFocusOnError="true"></asp:RequiredFieldValidator>



                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="IsDeleted" />
                                </td>
                                <td>
                                    <owc:OwCheckBox ID="IsDeletedCb" runat="server" Checked='<%# Bind("IsDeleted") %>'
                                        SkinID="OwCheckBoxAdmin" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="IsDefault" />
                                </td>
                                <td>
                                    <owc:OwCheckBox ID="IsDefaultCb" runat="server" Checked='<%# Bind("IsDefault") %>'
                                        SkinID="OwCheckBoxAdmin" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="ZIPCode" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="ZipCodeTxt" runat="server" Text='<%# Bind("ZIPCode") %>' SkinID="OwTextBox" />
                                    

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="MapImage" />
                                </td>
                                <td>
                                    <owc:OwEditor ID="MapImageEditor" runat="server"  
                                        Height="150" OwBindValue='<%# Bind("MapImage") %>' OwEditorType="OnlyInsertImage"
                                        SkinID="OwEditorInsertImageOnly" Width="400">
                                    </owc:OwEditor>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR  runat="server" OwText="Longitude" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="LongitudeTxt" runat="server" Text='<%# Bind("Longitude") %>' SkinID="OwTextBox" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="Latitude" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="LatitudeTxt" runat="server" Text='<%# Bind("Latitude") %>' SkinID="OwTextBox" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="AdditionalInformation" />
                                </td>
                                <td>
                                    <owc:OwEditor runat="server" ID="DescriptionEditor" Width="650" Height="400" Content='<%# Bind("AdditionalInformation") %>'
                                        SkinID="OwEditorBrief">
                                    </owc:OwEditor>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>
                <br />
                <br />
                <br />
            </InsertItemTemplate>
            <EditItemTemplate>
              <fieldset>
                    <legend>
                        <asp:Localize ID="Localize2" Text="<%$ OwR:GeneralInfo %>" runat="server"></asp:Localize>
                    </legend>
                    <div>
                        <owac:OwDetailCommonGroup ID="OwDetailCommonGroup1" runat="server" OwBindLanguageValue='<%# Bind("LanguageCode") %>'
                            OwBindContinentLocalityValue='<%# Bind("ContinentID") %>' OwBindCountryLocalityValue='<%# Bind("CountryID") %>'
                            OwBindProvinceLocalityValue='<%# Bind("ProvinceID") %>' OwBindDistrictLocalityValue='<%# Bind("DistrictID") %>'
                            OwAuthorVisible="false" OwSourceVisible="false" OwCategoryVisible="false" OwBindWardLocalityValue='<%# Bind("WardID") %>' />
                        <br />
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span>
                        <asp:Localize ID="Localize7" Text="<%$ OwR:InfoLabel %>" runat="server"></asp:Localize>
                    </span></legend>
                    <div>
                        <table width="100%">
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR  runat="server" OwText="HomeProfileDetails" />:&nbsp;
                                </td>
                                <td>
                                    <owc:OwObjectDataSource ID="OpenHomeProfileDetailOds" runat="server" OldValuesParameterFormatString="original_{0}"
                                        SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileDetailsBLL"
                                        DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileDetailsEntity" DeleteMethod="OwDelete"
                                        InsertMethod="OwInsert" UpdateMethod="OwUpdate">
                                        <SelectParameters>
                                            <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="false" />
                                            <asp:Parameter Name="languageCode" Type="String" />
                                            <asp:Parameter Name="openHomeProfileID" Type="Int64" />
                                            <asp:Parameter Name="firstNameID" Type="Int64" />
                                            <asp:Parameter Name="lastNameID" Type="Int64" />
                                            <asp:Parameter Name="isDefault" Type="Boolean" />
                                            <asp:Parameter Name="twelveYearCycleOfAnimalID" Type="Int32" />
                                            <asp:Parameter Name="fiveElementID" Type="Int32" />
                                            <asp:Parameter Name="hometownContinentID" Type="Int64" />
                                            <asp:Parameter Name="hometownCountryID" Type="Int64" />
                                            <asp:Parameter Name="hometownProvinceID" Type="Int64" />
                                            <asp:Parameter Name="hometownDistrictID" Type="Int64" />
                                            <asp:Parameter Name="hometownWardID" Type="Int64" />
                                            <asp:Parameter Name="zodiacID" Type="Int64" />
                                            <asp:Parameter Name="sortClause" Type="String" />
                                            <asp:Parameter Name="sortDirection" Type="String" />
                                            <asp:Parameter Name="startRowIndex" Type="Int32" />
                                            <asp:Parameter Name="maximumRows" Type="Int32" />
                                        </SelectParameters>
                                    </owc:OwObjectDataSource>
                                    <owc:OwComboBox ID="OpenHomeProfileDetailCbb" runat="server" DataSourceID="OpenHomeProfileDetailOds"
                                        DataTextField="FullName" SkinID="OwComboBox" DataValueField="OpenHomeProfileDetailID" EmptyMessage="<%$ OwR:HomeProfileDetailsSelect %>"
                                        SelectedValue='<%# Bind("OpenHomeProfileDetailID") %>'>
                                    </owc:OwComboBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="<%$ OwR:HomeProfileDetailsSelect %>" Text="*" ControlToValidate="OpenHomeProfileDetailCbb"  />

                                </td>
                            </tr>
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR   runat="server" OwText="Email" />
                                    :&nbsp;
                                </td>
                                <td>
                                    <owc:OwTextBox ID="EmailTxt" runat="server" Text='<%#Bind("Email") %>' SkinID="OwTextBox" />
                                    <asp:RequiredFieldValidator
                                        ID="RequiredFieldValidator2" runat="server" ControlToValidate="EmailTxt" ErrorMessage="<%$ OwR:EmailNotEmpty %>" Text="*" SetFocusOnError="true" Display="Dynamic"/>

                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                        ControlToValidate="EmailTxt" Display="Dynamic" 
                                        ErrorMessage="<%$OwR:EmailNotInvalid %>" 
                                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR  runat="server" OwText="PhoneNumber" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="PhoneNumberTxt" runat="server" Text='<%#Bind("PhoneNumber") %>'
                                        SkinID="OwTextBox" />
                                          <asp:RequiredFieldValidator
                                        ID="RequiredFieldValidator3" runat="server" ControlToValidate="PhoneNumberTxt" ErrorMessage="<%$ OwR:PhoneNumberNotEmpty %>" Text="*" SetFocusOnError="true" Display="Dynamic" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="MobilePhoneNumber" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="MobilePhoneNumberTxt" runat="server" Text='<%#Bind("MobilePhoneNumber") %>'
                                        SkinID="OwTextBox">
                                    </owc:OwTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR  runat="server" OwText="Address" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="AddressTxt" runat="server" Text='<%#Bind("Address") %>' SkinID="OwTextBox">
                                    </owc:OwTextBox>
                                                <asp:RequiredFieldValidator
                                        ID="RequiredFieldValidator4" runat="server" ControlToValidate="AddressTxt" ErrorMessage="<%$ OwR:AddressNotEmpty %>" Text="*" SetFocusOnError="true" Display="Dynamic"></asp:RequiredFieldValidator>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR  runat="server" OwText="IsDeleted" />
                                </td>
                                <td>
                                    <owc:OwCheckBox ID="IsDeletedCb" runat="server" Checked='<%# Bind("IsDeleted") %>'
                                        SkinID="OwCheckBoxAdmin" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="IsDefault" />
                                </td>
                                <td>
                                    <owc:OwCheckBox ID="IsDefaultCb" runat="server" Checked='<%# Bind("IsDefault") %>'
                                        SkinID="OwCheckBoxAdmin" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR  runat="server" OwText="ZIPCode" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="ZipCodeTxt" runat="server" Text='<%# Bind("ZIPCode") %>' SkinID="OwTextBox" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR runat="server" OwText="MapImage" />
                                </td>
                                <td>
                                    <owc:OwEditor ID="MapImageEditor" runat="server" Content='<%# String.Format("<img src={0} />",Eval("MapImage")) %>'
                                        Height="150" OwBindValue='<%# Bind("MapImage") %>' OwEditorType="OnlyInsertImage"
                                        SkinID="OwEditorInsertImageOnly" Width="400">
                                    </owc:OwEditor>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR   runat="server" OwText="Longitude" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="LongitudeTxt" runat="server" Text='<%# Bind("Longitude") %>' SkinID="OwTextBox" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR  runat="server" OwText="Latitude" />
                                </td>
                                <td>
                                    <owc:OwTextBox ID="LatitudeTxt" runat="server" Text='<%# Bind("Latitude") %>' SkinID="OwTextBox" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR  runat="server" OwText="AdditionalInformation" />
                                </td>
                                <td>
                                    <owc:OwEditor runat="server" ID="DescriptionEditor" Width="650" Height="400" Content='<%# Bind("AdditionalInformation") %>'
                                        SkinID="OwEditorBrief">
                                    </owc:OwEditor>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>

            </EditItemTemplate>
        </asp:TemplateField>

        <asp:TemplateField ShowHeader="False">
            <EditItemTemplate>
                <fieldset style="position: fixed; bottom: 0px; right: 0px; width: 100%">
                    <legend>
                        <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ OwR: Action %>" /></legend>
                  
                    <owc:OwButton ID="EditUpdateThenCloseButton" runat="server" CommandName="Update"
                        Text='<%$OwR:Update %>' OnClientClicking="showNotification">
                    </owc:OwButton>
                    &nbsp;
                    <owc:OwConfirmButton ID="EditDeleteButton" runat="server" CausesValidation="True"
                        CommandName="Delete" Text="<%$OwR:Delete %>" SkinID="OwConfirmButton">
                    </owc:OwConfirmButton>
                    &nbsp;<owc:OwButton ID="EditCancelButton" runat="server" CausesValidation="False"
                        CommandName="Cancel" Text="<%$OwR:Cancel %>">
                    </owc:OwButton>
                </fieldset>
            </EditItemTemplate>
            <InsertItemTemplate>
                <fieldset style="position: fixed; bottom: 0px; right: 0px; width: 100%">
                    <legend>
                        <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ OwR: Action %>" /></legend>
                    <owc:OwButton ID="InsertInsertButton" runat="server" CommandName="Insert" Text="<%$OwR:Insert %>"
                        OnClientClicking="showNotification" >
                    </owc:OwButton>
                    &nbsp;<owc:OwButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                        CommandName="Cancel" Text="<%$OwR:Cancel %>">
                    </owc:OwButton>
                </fieldset>
            </InsertItemTemplate>
        </asp:TemplateField>
    </Fields>
</owc:OwDetailsView>
<asp:ObjectDataSource ID="HomeProfileContactInfosOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileContactInfosEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileContactInfosBLL" UpdateMethod="OwUpdate"
    SelectMethod="OwGetEntity">
    <InsertParameters>
        <asp:Parameter Name="openHomeProfileContactInfoID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="email" Type="String" />
        <asp:Parameter Name="phoneNumber" Type="String" />
        <asp:Parameter Name="mobilePhoneNumber" Type="String" />
        <asp:Parameter Name="address" Type="String" />
        <asp:Parameter Name="continentID" Type="Int64" />
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="provinceID" Type="Int64" />
        <asp:Parameter Name="districtID" Type="Int64" />
        <asp:Parameter Name="wardID" Type="Int64" />
        <asp:Parameter Name="isDefault" Type="Boolean" />
        <asp:Parameter Name="additionalInformation" Type="String" />
        <asp:Parameter Name="zIPCode" Type="String" />
        <asp:Parameter Name="mapImage" Type="String" />
        <asp:Parameter Name="latitude" Type="Decimal" />
        <asp:Parameter Name="longitude" Type="Decimal" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
    </InsertParameters>
    <SelectParameters>
        <asp:QueryStringParameter Name="openHomeProfileContactInfoID" QueryStringField="ID"
            Type="Int64" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="openHomeProfileContactInfoID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="email" Type="String" />
        <asp:Parameter Name="phoneNumber" Type="String" />
        <asp:Parameter Name="mobilePhoneNumber" Type="String" />
        <asp:Parameter Name="address" Type="String" />
        <asp:Parameter Name="continentID" Type="Int64" />
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="provinceID" Type="Int64" />
        <asp:Parameter Name="districtID" Type="Int64" />
        <asp:Parameter Name="wardID" Type="Int64" />
        <asp:Parameter Name="isDefault" Type="Boolean" />
        <asp:Parameter Name="additionalInformation" Type="String" />
        <asp:Parameter Name="zIPCode" Type="String" />
        <asp:Parameter Name="mapImage" Type="String" />
        <asp:Parameter Name="latitude" Type="Decimal" />
        <asp:Parameter Name="longitude" Type="Decimal" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
    </UpdateParameters>
</asp:ObjectDataSource>
